package com.yh.patterns.Strategy.job;

import java.util.Scanner;

/**
 * @Author:云尚
 * @Description:
 */
public class Client {
    public static void main(String[] args) {
        System.out.print("请输入用户密码：");
        Scanner input=new Scanner(System.in);
        String s = input.next();
        System.out.println("\t"+"输入1，选择MD5加密");
        System.out.println("\t"+"输入2，选择DES加密");
        System.out.println("\t"+"输入3，选择凯撒加密");
        System.out.print("请选择加密方式：");
        int i= input.nextInt();
        if (i==1) {
            //MDS加密
            ContextPwd contextPwd = new ContextPwd(new MD5Cipher());
            contextPwd.show();
        }else if(i==2){
            //DES加密
            ContextPwd contextPwd1 = new ContextPwd(new DESCipher());
            contextPwd1.show();
        }else if(i==3){
            //凯撒加密
            ContextPwd contextPwd3 = new ContextPwd(new CaesarCipher());
            contextPwd3.show();
        }else{
            System.out.println("输入的选项不存在请重新输入：");
        }
    }
}
